#ifndef __WEAPON_H__
#define __WEAPON_H__
#include "cocos2d.h"
#include "Cannon.h"
#include "Bullet.h"
#include "FishingNet.h"

enum WeaponStatus
{
	k_Weapon_Status_None = 0,
	k_Weapon_Status_Bullet,
	k_Weapon_Status_FishingNet
};

class Weapon : public cocos2d::CCNode
{
public:
	Weapon();
	virtual ~Weapon();
	bool init(CannonType type=k_Cannon_Type_1);
	static Weapon* create(CannonType type=k_Cannon_Type_1);
	CannonType getCannonType();
	Cannon* getCannon() const { return _cannon; }
	Bullet* getBullet() const { return _bullet; }
	FishingNet* getFishingNet() const { return _fishingNet; }
	bool shootTo(cocos2d::CCPoint touchLocation);
	WeaponStatus getStatus();
	void aimAt(cocos2d::CCPoint target);
	void end();
	cocos2d::CCPoint getCollisionPoint();
	cocos2d::CCRect getCollisionArea();
private:
	Cannon* _cannon;
	Bullet* _bullet;
	FishingNet* _fishingNet;
	//cocos2d::CCParticleSystemQuad* _particle;
};

#endif